import { ConfigProvider } from "antd";
import { connect } from "react-redux";
import { setLanguage } from "@/redux/modules/global/action";
import { BrowserRouter } from "react-router-dom";
import Router from "@/routers/index";
import AuthRouter from "@/routers/utils/authRouter";

const App = (props: any) => {
	return (
		// <HashRouter>
		// 	<ConfigProvider locale={i18nLocale} componentSize={assemblySize}>
		// 		<AuthRouter>
		// 			<Router />
		// 		</AuthRouter>
		// 	</ConfigProvider>
		// </HashRouter>
        <BrowserRouter>
            <ConfigProvider>
                <AuthRouter>
                    <Router />
                </AuthRouter>
            </ConfigProvider>
        </BrowserRouter>
	);
};

const mapStateToProps = (state: any) => state.global;
const mapDispatchToProps = { setLanguage };
export default connect(mapStateToProps, mapDispatchToProps)(App);
